//package com.cn.bukeManage.controller;
//
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//import com.cn.bukeManage.service.CouponService;
//import java.util.List;
//import java.util.Map;
//import javax.annotation.Resource;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//
////这是优惠卷管理
//@Controller
//@RequestMapping("/coupons")
//public class CouponController {
//	@Resource
////	private CouponService couponService;
//	@RequestMapping("/couponsSet")
//	public String couponsSet(Model model,Integer currentPage,Integer forWho){
//		List<Map<String,Object>> coupons=null;
//		if(forWho==3){
//			coupons=couponService.getAllCouponsSet(model,currentPage);
//		}else {
//			 coupons=couponService.getAllCouponsByForWho(model,forWho,currentPage);
//		}
//		model.addAttribute("oneMenu","coupons");
//		model.addAttribute("twoMenu","couponsSet");
//		model.addAttribute("coupons",coupons);
//		return "coupons/couponsSet";
//	}
//	
//	//新增优惠卷
//	@RequestMapping("/addNewCoupons")
//	@ResponseBody
//	public Integer addNewCoupons(Integer knock,Integer fullRedultion,String beginString,String overString,String beginTime,String failureTime,Integer forWho){
//		Integer integer=couponService.addNewCoupons(knock,fullRedultion,beginString,overString,beginTime,failureTime,forWho);
//		return integer;
//	}
//	//修改优惠卷
//	@RequestMapping("updateCoupons")
//	@ResponseBody
//	public Integer updateCoupons(Integer couponsId,Integer knock,Integer fullRedultion,String beginString,String overString,String beginTime,String failureTime,Integer forWho){
//		Integer integer=couponService.updateCoupons(couponsId,knock,fullRedultion,beginString,overString,beginTime,failureTime,forWho);
//		return integer;
//	}
//	//根据优惠卷id获取他的所有信息
//	@RequestMapping("getCouponsByCouponsId")
//	@ResponseBody
//	public Map<String,Object> getCouponsByCouponsId(Integer couponsId){
//		Map<String,Object> map=couponService.getCouponsById(couponsId);
//		return map;
//	}
//}
